package com.nickstumpos.android.GmailWidgetPlus.labels;

import com.nickstumpos.android.GmailWidgetPlus.Constants.GMWP_Constants;

public class LabelCountPair {

	private String	label;
	private int		count;

	public LabelCountPair(final String label, final int count) {

		super();
		this.label = label;
		this.count = count;
	}

	/**
	 * @return the count
	 */
	public int getCount() {

		return this.count;
	}

	/**
	 * @return the label
	 */
	public String getLabel() {

		return this.label;
	}

	/**
	 * @param count
	 *            the count to set
	 */
	public void setCount(final int count) {

		this.count = count;
	}

	/**
	 * @param label
	 *            the label to set
	 */
	public void setLabel(final String label) {

		this.label = label;
	}

	@Override
	public String toString() {

		String ret = this.label;
		if (this.label.startsWith(GMWP_Constants.SYSTEM_LABEL_PREFIX)) {
			final SystemLabels sl = SystemLabels.systemLabelByCode(this.label);
			if (sl != null) {
				ret = sl.getName();
			}
		}
		return ret;
	}
}
